]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Add a check ornament
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 20 Apr 2013 01:13:37 +0000 (21:13 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Tue, 23 Apr 2013 19:50:36 +0000 (15:50 -0400)
This will be used to replace switches in the remote menu

https://bugzilla.gnome.org/show_bug.cgi?id=698427

js/ui/popupMenu.js

index 8f600a439d2755097d0addf126b3f8f81d730faf..9844baf2e6084d0ec917fdc57d7fbb8a52830b25 100644 (file)
@@ -22,6 +22,7 @@ const SLIDER_SCROLL_STEP = 0.05; /* Slider scrolling step in % */
 const Ornament = {
     NONE: 0,
     DOT: 1,
+    CHECK: 2,
 };
 
 function _ensureStyle(actor) {
@@ -192,6 +193,9 @@ const PopupBaseMenuItem = new Lang.Class({
         if (ornament == Ornament.DOT) {
             this._ornamentLabel.text = '\u2022';
             this.actor.add_accessible_state(Atk.StateType.CHECKED);
+        } else if (ornament == Ornament.CHECK) {
+            this._ornamentLabel.text = '\u2713';
+            this.actor.add_accessible_state(Atk.StateType.CHECKED);
         } else if (ornament == Ornament.NONE) {
             this._ornamentLabel.text = '';
             this.actor.remove_accessible_state(Atk.StateType.CHECKED);